import { goLogin } from '@/utils';
let checkLogin = false;
let init = {
    app: null,
    "sign_key": '',
    "TokenKey": '',
    "requestError": {
        '410': (res) => {
            uni.hideLoading();
            if(!checkLogin){
                checkLogin = true;
                goLogin({
                    handle:()=>{
                        checkLogin = false;
                    },
                    cancel:()=>{
                        
                    }
                });
            }
        },
        error: (err) => {
            uni.hideLoading();
            let codeList = [ 126019, 126020];
            if( codeList.includes(err.code)) return;
            uni.showToast({
                title: err.errmsg,
                icon: 'none',
            });
        }
    }
}
export default init;